home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
web
/
fweb
/
READ_ME
< prev
next >
Wrap
Text File
|
1993-10-29
|
24KB
|
722 lines
--- FWEB PUBLIC FILES ---
Last update: October 30, 1993
IMPORTANT NOTICES (most recent first):
===============================================================================
NOTICE (October 30, 1993)
Version 1.40 is available. However, THIS VERSION IS NOT RECOMMENDED FOR
NEW USERS OR FOR LARGE PROGRAMMING PROJECTS ALREADY DEPENDENT ON A STABLE
FWEB ENVIRONMENT. If you're not willing to experiment, stick to v1.30.
Proceed at your own risk! For more information, see READ_ME-1.40.
========================================
(The following notices pertain to v1.30.)
NOTICE (August 16, 1993)
SGI machines have a non-ANSI ctype.h that breaks certain parts of FWEB.
One symptom is that Fortran comments beginning with `//' are not processed
correctly. To fix this, change the last few lines of includes.hweb to
-------------------------------------------------------------------------------
#include <ctype.h> // ANSI: Character classification macros.
#undef isalpha
#define isalpha(c) (isascii(c) && ((_ctype + 1)[c] & (01 | 02)))
#include <setjmp.h> // ANSI: |longjmp| and |setjmp|.
@I time.hweb // Timing's quite an annoyance.
-------------------------------------------------------------------------------
Furthermore, change the lines in common.hweb
-------------------------------------------------------------------------------
/* Scan over subsequent elements of an identifier. */
while (isAlpha(*++loc) || isDigit(*loc) ||
*loc==@'_' || *loc==@'$' || (in_format && *loc==@'.') );
-------------------------------------------------------------------------------
to
-------------------------------------------------------------------------------
/* Scan over subsequent elements of an identifier. */
for(++loc; isAlpha(*loc) || isDigit(*loc) ||
*loc==@'_' || *loc==@'$' || (in_format && *loc==@'.'); loc++)
;
-------------------------------------------------------------------------------
then remake the release by saying ``make''. (Don't say ``make bootstrap'',
as that prevents new *.c files from being tangled.)
NOTICE (July 28, 1993)
Users of VAX' cc should change the macro definitions in ftangle.c
--------------------
#define TRUE
#define FALSE !\
--------------------
to
--------------------
#define M_TRUE
#define M_FALSE !\
--------------------
and also change the lines
--------------------
case m_ifdef:
DEF_OR_NDEF(TRUE);
break;
case m_ifndef:
DEF_OR_NDEF(FALSE);
break;
--------------------
to
--------------------
case m_ifdef:
DEF_OR_NDEF(M_TRUE);
break;
case m_ifndef:
DEF_OR_NDEF(M_FALSE);
break;
--------------------
(Consider using gcc instead.)
NOTICE (July 8, 1993)
There are two problems with 1.30a on IBM-RISC's. First, a cc compiler
message like
-------------------------------------------------------------------------------
ftangle.c", line 4527.32: 1506-025 (S) Operand must be a modifiable lvalue.
-------------------------------------------------------------------------------
refers to the line in ftangle.c
-------------------------------------------------------------------------------
n= MIN(end-np->byte_start,MAX_ID_LENGTH-1);
-------------------------------------------------------------------------------
This expands into a ?: construction, and it's complaining about the ? for
some reason. This appears to be a compiler bug; if you don't think so,
please explain. In any event, it should work if you replace that line by
-------------------------------------------------------------------------------
#if 0
n= MIN(end-np->byte_start,MAX_ID_LENGTH-1);
#endif
if(end - np->byte_start < 31)
n = end - np->byte_start;
else
n = 31;
-------------------------------------------------------------------------------
Second, the link stage will fail with missing ftime; to fix that, say
-------------------------------------------------------------------------------
make LIBS="-lbsd -lm"
-------------------------------------------------------------------------------
NOTICE (June 25, 1993)
Executable files for the IBM-PC with MS-DOS are available in
/pub/fweb/executables/fweb-1.30/*.exe
The file ftangle0.exe is ftangle sans Ratfor, for a modest savings in size.
NOTICE (June 18, 1993)
Sun users running Solaris should invoke the Makefile with
make bootstrap LIBS="-L/usr/ucblib -lucb -lelf -lm"
NOTICE (June 17, 1993)
FWEB 1.30 was updated to 1.30a to several difficulties with @o processing.
If you installed version 1.30 before today, you can either reinstall from
the new tar file or contact me for change files.
NOTICE (June 10, 1993)
The final version of FWEB v1.30 is available.
This release contains a few bug fixes and features a more standard and
complete installation procedure for Unix users. For more details, see
fweb-1.30/READ_ME.FWEB.
In the transition from v1.30--beta to v1.30, the following changes were
made:
Moved Makefile to web/Makefile.
Added manual/Makefile.
Added the ./configure automatic installation option.
Greatly augmented the texinfo file.
Changed -a to -A.
Removed a few upper-case command-line options that weren't
documented and had lower-case equivalents.
Added -E option (change delimiter for file-name extension)
Changed -I to -i! (don't read include file)
Added environment variable FWEB_INCLUDES (set directory list for
include files)
Added -I option (append to directory list for include files)
Added -Wf option (don't weave @f statements) in response to user
requests.
Added the preprocessor token '#,' (non-delimiting comma).
Beautified the woven output from TeX mode by improving the handling
of tabs (they're now turned into the string macro \3).
Found various (non-gcc) compiler bugs, and kludged the code.
Fixed an egregious bug related to file opens.
Fixed a few microscopic bugs.
-------------------------------------------------------------------------------
NOTICE (January 5, 1993):
Please note that Marcus Speh's fweb-faq, ``FWEB in Questions and
Answers,'' is now available in /pub/fweb/faq. This may serve as an
additional source of information for those who are intimidated by the
manual.
Incidently, note that the user/syntax reference guide can be obtained
independently of the full manual. If you're a seasoned WEB user, the
reference guide should be adequate.
===============================================================================
The public version of FWEB is now contained in this directory in tar
files of the form fweb-1.30.tar.Z. If there is more than one tar file, pick
the one with the highest version number unless you have some specific
reason to pick another one. To unpack the tar file, do the following:
uncompress fweb-1.30.tar
tar -xvf fweb-1.30.tar
This creates the directory fweb-1.30. For installation instructions, see
fweb-1.30/READ_ME.FWEB.
The tar files do not contain executable files. Executable files for the
IBM-PC may (or may not, depending on my progress) be found in the
subdirectory ./executables.
Here's a summary of the versions to date:
1.0 --- The original. (1989)
1.10 --- Major restructuring of v. 1.0 to accomodate the IBM-PC.
(May, 1990)
1.20 --- Adds support for C++ and Fortran-90, as well as many other
new features, bug fixes, and improved documentation.
1.30 --- More bug fixes; a few new features. See the appendix below.
Version 1.30--beta (January 1, 1993).
Version 1.30--beta (Feburary 3, 1993). A few
glitches fixed.
``Final'' version June 10, 1993.
Version 1.30a (June 17, 1993) Fixed a few glitches
with @o.
-------------------------------------------------------------------------------
I will be happy to answer questions about installing or using FWEB, and
to receive suggestions and bug reports. Unfortunately, I CAN NO LONGER
GUARANTEE AN IMMEDIATE RESPONSE due to severe funding difficulties in the
U.S. fusion program and the consequent professional pressures. Experience
has shown that providing daily support for FWEB is incompatible with
carrying on a full schedule of professional research. Therefore, please
understand that this is a SPARE-TIME ACTIVITY; thanks very much for your
patience.
---John
June 10, 1993
krommes@princeton.edu | John A. Krommes
| Plasma Physics Laboratory
(Mail to krommes@princeton.edu is forwarded | P.O. Box 451
to krommes@lyman.pppl.gov == 192.55.106.129) | Princeton, NJ 08543
(To ftp files, you must use lyman.pppl.gov.) | Phone: (609) 243--2606
===============================================================================
APPENDIX A: BUGS newly discovered with version 1.30
The following list will be updated as bugs, questions, and/or annoyances
are reported. Typically the bugs listed here will already be fixed in my
development version, but the fixes won't yet be reflected in the public
release. If you're being held up by one of the bugs listed here (or
especially by one NOT listed here), please contact me.
FWEAVE:
After saying ``@f `\@@ 11'', identifiers such as \a@b (input as
``\a@@b'') appeared in the index with two @'s instead of one.
Fixed for next release.
APPENDIX B: BUGS and REMARKS ABOUT v1.30--beta and previous versions
--- SERIOUS BUGS ---
BOOTSTRAPPING:
* FWEB wasn't debugged on non-ASCII machines.
V1.2 was debugged thanks to Thorsten Ohl.
I don't think v1.30 has been tried yet.
* MACINTOSH support not provided.
If you SERIOUSLY want FWEB on the Mac, vote by sending me a message.
(I haven't gotten many so far.)
RATFOR:
* Right braces are not recognized properly when buried inside a WEB macro
definition.
Try replacing the macro definition with a WEB module. If that
doesn't work, please let me know.
* The expansion of a |switch| statement uses a dummy variable like I90000
that isn't declared. This causes grief when one uses a compiler switch
that forces all variables to be declared.
Sorry: This one's nontrivial, and it's NOT fixed yet. (The
problem only arises when the |switch| is not expanded into a computed
|goto|. In some cases you might be able force it to use the computed
|goto| even if it doesn't naturally want to; try using the -rgm1 option.)
--- MINOR ANNOYANCES (to most people) ---
COMMON:
* In Fortran, when using !! comments the semicolon isn't put
before it properly.
NOT FIXED YET!!! (Use // ... for short comments.)
* In Fortran--90, free-form syntax doesn't insert semicolons.
NOT FIXED. (And maybe won't be.)
FTANGLE:
* The following construction doesn't work right in Fortran:
/*
include 'a'
*/ include 'b'
The fix is to terminate the comment on a line by itself.
FWEAVE:
* @<|Fortran code|@> doesn't always format right; problems with semicolons
in module names, and other things.
NOT FIXED YET.
* C++ functions such as `+' weren't placed into the index, and the next
identifier was spuriously marked as defined.
`+' and similar things are now put into index.
MARKING PROBLEM NOT ENTIRELY FIXED. To turn off the subscripting,
say ``mark_defined.fcn_name 0'' in fweb.sty.
* C initializations get an extra space after the variable name.
NOT FIXED YET.
* In C or C++, doesn't format certain constructions like
-------------------------------------------------------------------------------
void fct1(int (*)[VSIZE]);
-------------------------------------------------------------------------------
correctly.
A TEMPORARY FIX is to use @e in place of the implicit variable, as
in
-------------------------------------------------------------------------------
void fct1(int (*@e)[VSIZE]);
-------------------------------------------------------------------------------
* Connection machine Fortran (CM-Fortran) has some extensions not in
Fortran--90.
As a temporary measure, try
-------------------------------------------------------------------------------
@f forall if
@f times only
@f diagonal all
@f rank all
@f replicate all
@f project all
@f firstloc all
@f lastloc all
FWEBMAC:
* Output routine doesn't interact well with LaTeX's figure environment and
epsf.sty.
This is because fwebmac.sty usurps the \output routine. Someday
this will be fixed.
MACRO PROCESSING:
* _M(foo (bar)) behaves as a one-argument macro.
You may now say _M(foo=(bar)) to get the effect of ``@m foo (bar)''.
* _ERROR is evaluated even for unprocessed arguments in _IFCASE.
NOT FIXED YET.
RATFOR:
* Certain Fortran and Ratafor error messages aren't continued properly in
the tangled output.
NOT FIXED, but harmless since you ought to fix up the error anyway
before attempting to compile.
--- RECENT (v1.30--beta) FEATURES and IMPROVEMENTS ---
WARNING: Some of the following enhancements may not be stable. It may
not be a good idea to use them just yet for extensive programming
projects. However, experimentation and comments are encouraged.
COMMON (command-line, @ commands, etc.):
* The @" command was missing.
Implemented @"..." (translate string to ASCII) in a way close to
the action of @'...'. Also added the analogous built-in macro _A.
* The -x command kills off not only the index, but also module list and
table of contents.
This command really means ``don't bother with ANY cross-reference
information''. It's been generalized to the form ``-x[??]'', where the
optional question marks are one or more of `*cim', standing for
* --- ``everything''
c --- ``contents''
i --- ``index''
m --- ``modules''
The command ``-x' is equivalent to ``-x*'', which means kill everything.
The command ``-xim'' means kill off the index and module list, etc.
* Couldn't query memory allocation settings.
Now, if you say ``-yaa'', you query the present setting for the
dynamic memory buffer whose abbreviation is ``aa''. To query everything,
say ``-y''.
* Added command-line option -D to see the reserved words of the current
language.
For example,
-------------------------------------------------------------------------------
-Lc -Dabc
-------------------------------------------------------------------------------
prints all the reserved words of the C language beginning with "abc".
(-D*abc does all languages.)
* Added command-line option -p to set a style-file parameter.
Thus default style-file settings can be put into .fweb---e.g.,
-------------------------------------------------------------------------------
+pmeta.top.N "start"
+pmeta.bottom.N "done"
-------------------------------------------------------------------------------
* Added -Z option to obtain the defaults for style-file parameters.
-Zabc prints the default values of all style-file parameters
beginning with "abc", and also prints any ones that were modified by
fweb.sty. --Zabc only prints the modified ones.
There are still a few problems with this command: it doesn't do colors
correctly, and one can't see the default setting of command codes (which
aren't initialized until later).
FTANGLE:
* Compiler directives didn't interact well with the macro preprocessor. In
particular, macro arguments after a @! weren't substituted since the entire
text of a @! was treated as a string.
Temporarily, the @? command has been defined to be a compiler
directive, but with a different mode of parsing the text of the command.
This allows one to define macros such as
-------------------------------------------------------------------------------
@m A(x,y) @? a[x][y]
-------------------------------------------------------------------------------
in which the |x| and |y| are properly expanded.
It is intended that @? become the standard directive command in the
future. Therefore, please change your compiler directives to @? and report any
problems.
*Added the truncation command -t.
If you say, for example, ``-tc6'', all ordinary C variables (not
WEB macros, reserved words, or intrinsic functions) will be truncated to 6
characters. If this produces any nonuniqueness, a sorted list of the
conflicts will be written to the terminal. You can specify a list of
characters to remove (``filter'') during the truncation by appending a
brace-delimited list. For example, ``-tn6{_}'' would turn both of the
Fortran variables |abcdefg| and |abc_defg| into |abcdef| and then would
complain about ``non-unique FORTRAN variables.'' (But it wouldn't mess
with reserved words such as |program| or |precision|.)
For this command to be truly useful for generating compilable code, it
needs a mechanism for making unique variables from the non-unique ones.
I'm still thinking about that. Meanwhile, it can still serve as
development tool to help make you make your codes portable. (For example,
ANSI C says that compilers need support external variables of just 6
characters or less.)
FWEAVE:
* Can't get '|' in TeX text, especially between LaTeX's \begin{\verbatim}
and \end{verbatim}.
Generalized the `@|' command to output '|' in TeX mode.
* Bad @ commands (valid for neither FTANGLE nor FWEAVE) aren't flagged in
any way.
Now a warning message is (often) generated.
* Couldn't have module names inside |...|. For example, one couldn't say
``The module |@<Graphics@>|, defined below...''.
Hopefully fixed (with relatively DANGEROUS and EXTENSIVE CHANGES to
Knuth's original design). Contemplate constructions such as ``|@<A =
|@<B@>|@>|''. The changes give rise to related complications such as
correctly handling things like ``|@.|@>|''.)
* In C, couldn't typeset the `or' symbol '|' between vertical bars. In other
words, one couldn't say ``|x|y|'' because the `or' terminated the code mode.
Fixed by introducing the token `|||' as a synonym for '|'. Thus,
say ``|x|||y|''. (At present, this doesn't work with FTANGLE in the code
part, but it's not necessary there.)
* Added the @W command.
The @W command (still experimental) tells FWEAVE to overload an
IDENTIFIER---that is, to change its appearance on output. (Distinguish
this command from the @v command, which overloads OPERATORS such as + or
.FALSE.) There are three forms of this command:
@W x . // Equivalent to ``@W x \x''
@W x \y // In the woven output, replaces ``x'' by the TeX macro ``\y''.
@W x "TeX text" // In the woven output, replaces ``x'' by the TeX text.
For some applications this command can be used to advantage to beautify the
typeset output. For example, in you were working with covariant notation
in C, you might want to print |A[a][b]| as
\alpha
A
\beta
You could accomplish this by saying
-------------------------------------------------------------------------------\def\A[#1][#2]{A^{#1}{}_{#2}}
@W A .
@W a \alpha
@W b \beta
-------------------------------------------------------------------------------
A significant deficiency of the command in its present form is that it
doesn't take arguments (unlike WEB macro definitions). This means that a
scheme like the above won't work right with nested calls such as
A[A[1][2]][3] because \TeX's macro processor would stop at the first right
bracket it found, which would be the wrong one in this case. In cases like
this you probably shouldn't be doing such complicated overloading anyway,
as the typeset output might be too far removed from the actual code. In
any event, the changes necessary to allow the @W definitions to take
arguments are extremely complicated, so probably won't be done soon.
* Added the @- command to allow one to delete selected variables from the
index.
If you precede a variable by @- (anywhere, just once), then the
variable won't be printed in the index.
* Added a special bracket-processing feature.
When the option `-W[' is used, FWEAVE replaces square brackets by a
special TeX macro. This helps one to pretty up the formatting of array
indices. See the user manual for more details.
FWEBMAC:
* Block numbering (-b option) wasn't defined in the most general way.
Introduced the fwebmac macro \Wblock so user has control over the
formatting.
* The same variable \parindent was used for various kinds of indents.
Introduced \TeXindent in addition to \notch.
Changed style-file variable ``parindent'' to ``indent.TeX'';
introduced ``indent.code''.
MACRO PROCESSING:
* Couldn't stringize to a single-quoted string in C.
Added the #' and #" macro tokens. E.g.,
@m A(argument) #'argument
puts single quotes around the argument in C.
* No macro for returning a standardized number for the current language.
Added _LANGUAGE_NUM, which can be used with an _IFCASE for
language-dependent processing.
* No facility for easily debugging macros.
Added _DUMPDEF. Takes as arguments a list of macro calls, then
dumps both the original definitions and the current expansion to the terminal.
* Couldn't change the case of a macro argument.
Added the built-ins _U and _L, which change strings to upper or
lower case.
* Added the built-in macros _INPUT_LINE, _OUTPUT_LINE, _MODULE_NAME,
_SECTION_NUM.
These can be used to improve the quality of diagnostic
messages constructed with the macro processor.
* Added the built-in function _DO(I,imin,imax){...} or
_DO(I,imin,imax,di){...}.
This repetitively defines the WEB macro |I| like a Fortran do would:
do I=imin,imax,di. Thus
-------------------------------------------------------------------------------
@c
@
@a
_DO(I,1,5)
{a[I] = b[I];}
-------------------------------------------------------------------------------
tangles into 5 statements, the fourth of which is ``a[4] = b[4];''.
* To go along with the above, added the construction #[I] to the
preprocessor.
Here I must be an integer (possibly via a WEB macro). The
construction #[2] refers to the second argument of the macro call
(including the fixed arguments). (Compare this to #2, which is the second
variable argument.) #[0] means the total number of arguments in the call.
Thus, in
-------------------------------------------------------------------------------
@m A(x,y,...) #[0],#[2],#0,#2
-------------------------------------------------------------------------------
the call ``A(f1,f2,v1,v2,v3)'' expands into ``5,f2,3,v2''.
===============================================================================
APPENDIX C: COMMON QUESTIONS
* Where does one get the utility makeindex, needed for producing the index
to the manual?
ftp.math.utah.edu:/pub/tex/pub/makeindex/2-11
(The extension .trz is equivalent to .tar.Z.)
* What must one do to use LaTeX instead of TeX?
Basically nothing. Just say ``fweave webfile -PL'' instead of
``fweave webfile'', then use latex instead of tex. The -P option tells FWEAVE
which TeX processor will be used; -PL changes the names of certain
macros---in particular, \\---output by FWEAVE to avoid conflicts with
LaTeX. If you never use \\ in your LaTeX code, then you don't need the -PL
option.
* With LaTeX, how do I inform FWEAVE that I want to use additional macro
packages or style files?
Put into fweb.sty the line ``LaTeX.options "eqalign,my" if you want it
to read eqalign.sty and my.sty.
* Can one customize the indentation of the braces in C or Ratfor code that
weaves like the following?
-------------------------------------------------------------------------------
if(x)
{
stuff;
}
-------------------------------------------------------------------------------
As long as you don't want the { on the same line as the if, you can
simply redefine \{ and \}, such as
\def\{{\4\LB}
\def\}{\kern-0.5\notch\RB}
to get the strange effect in which the left brace is one whole tab width to
the left of where it's usually put and the right brace is a half tab width
to the left---i.e.,
if(x)
{
stuff;
}